import api from '@/utils/api';
import registerServer from '@/utils/register-server';
import request from '@/utils/request';

const {
  seed_agent_create,
  seed_agent_list,
  data_rules_create,
  data_rules_list,
  data_rules_batch_query,
  data_rules_update,
  data_rules_detail,
  data_rules_delete,
  seed_agent_update,
  seed_agent_detail,
  seed_agent_delete,
} = api;

const methods = {
  seed_agent_create: {
    url: seed_agent_create,
    method: 'post',
  },

  seed_agent_list: {
    url: seed_agent_list,
    method: 'post',
  },
  data_rules_create: {
    url: data_rules_create,
    method: 'post',
  },
  data_rules_batch_query: {
    url: data_rules_batch_query,
    method: 'post',
  },
  data_rules_list: {
    url: data_rules_list,
    method: 'post',
  },
  data_rules_update: {
    url: data_rules_update,
    method: 'post',
  },
  data_rules_detail: {
    url: data_rules_detail,
    method: 'post',
  },
  data_rules_delete: {
    url: data_rules_delete,
    method: 'post',
  },
  seed_agent_update: {
    url: seed_agent_update,
    method: 'post',
  },
  seed_agent_detail: {
    url: seed_agent_detail,
    method: 'post',
  },
  seed_agent_delete: {
    url: seed_agent_delete,
    method: 'post',
  },
};

const seedAgent = registerServer<keyof typeof methods>(methods, request);

export default seedAgent;
